package atguigu07.object.equals.exer2;

/**
 * ClassName: MyData
 * Package: atguigu07.object.equals.exer2
 * Description:
 *
 * @Author BuTang
 * @Create 2023/3/8 21:02
 * @Version 1.0
 */
public class MyDate {
    private int day;
    private int month;
    private int year;

    public MyDate(int day, int month, int year) {
        this.day = day;
        this.month = month;
        this.year = year;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        MyDate m1 = (MyDate) obj;
        return this.day == m1.day && this.year == m1.year && this.month == m1.month ;
    }
}
